package itheima.ZuoYe02;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Demo03 {
    public static void main(String[] args) {
        List<String>list = new ArrayList<>();
        list.add("cab");
        list.add("bac");
        list.add("acb");
        list.add("cba");
        list.add("bca");
        list.add("abc");
        Collections.sort(list,(o1, o2) -> (o2.compareTo(o1)));
        System.out.println(list);
    }
}
